import * as types from '../actions/types';

/*
教师签退记录列表
*/
export default function checkout(checkoutList = [], action) {
  switch (action.type) {
  	case types.SET_CHECKOUT_LIST:
  		return action.v;
  	case types.SET_MORE_CHECKOUT_LIST:
  		return [...checkoutList, ...action.v];
    case types.ADD_CHECKOUT_RECORD:
      return [action.v, ...checkoutList];
  	case types.CLEAR_CHECKOUT_LIST:
  		return [];
  	default:
  		return checkoutList;
  }
} 